import request from '@/utils/request.js'

const authApi = {
    list(authQuery) {
        return request.get('/auth/list', {params: authQuery})
    },
    deleteById(id) {
        return request.delete(`/auth/deleteById/${id}`)
    },
    deleteAll(ids) {
        return request.delete(`/auth/deleteAll/${ids}`)
    },
    add(auth) {
        return request.post('/auth/add', auth)
    },
    selectById(id) {
        return request.get(`/auth/selectById/${id}`)
    },
    update(auth) {
        return request.put(`/auth/update`, auth)
    },
    updateStatus(id, status) {
        return request.put(`/auth/updateStatus/${id}/${status}`)
    },
    selectByRole() {
        return request.get(`/auth/selectByRole`)
    }
}

export default authApi